<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>外部的js</title>
</head>

<body>
    <h1>我的 Web 页面</h1>
    <p id="demo">一个段落。</p>
    <button type="button" onclick="myFunction()">点击这里</button>
    <p><b>注释：</b>myFunction 保存在名为 "myScript.js" 的外部文件中。</p>
    <script src="myScript.js"></script>
</body>

</html>